# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""

import numpy as np
import matplotlib.pyplot as plt

def Quadratic(x):
    return 4*x**2 +1*x +1.5

def ladder(lnum):
    x = np.linspace(-5, 5, num=100)
    y = Quadratic(x)
    plt.plot(x, y, color = 'red')
    a = np.linspace(-5, 5, num=lnum)
    for i in range(lnum):
        plt.plot([a[i], a[i]], [0, Quadratic(a[i])], color="yellow")
        plt.plot([-5, 5], [0, 0], color="yellow")
    l = [];
    for i in range(lnum):
        l.append([a[i],Quadratic(a[i])]) 

    np.l = np.array(l)
    plt.plot(np.l[:,0],np.l[:,1],color="yellow"); 
print(ladder(40))